package com.lin.repository;

import com.lin.dataobject.Product;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by Administrator on 2017-10-20.
 */
public interface ProductRepository extends JpaRepository<Product,String>{
    List<Product> findAll(Specification<Product> specification);

    Page<Product> findAll(Specification<Product> specification, Pageable pageable);

    Long count(Specification<Product> specification);
}
